/*  -*- C++ -*-  vim: set syntax=cpp: */
/* (C) 2008 Frank-Rene Schaefer*/
#ifndef __QUEX_INCLUDE_GUARD__BUFFER__PLAIN__BUFFER_FILLER_PLAIN
#define __QUEX_INCLUDE_GUARD__BUFFER__PLAIN__BUFFER_FILLER_PLAIN
/**/

#if ! defined (__QUEX_OPTION_PLAIN_C)
#   include <iostream> 
#   include <cerrno>
#   include <stdexcept>
#endif
#include <quex/code_base/definitions>
#include <quex/code_base/buffer/InputPolicy>
#include <quex/code_base/buffer/Buffer>
#include <quex/code_base/buffer/BufferFiller>

#include <quex/code_base/temporary_macros_on>

QUEX_NAMESPACE_MAIN_OPEN

    TEMPLATIFIER(BufferFiller_Plain, InputHandleT) {
        /* Derived BufferFiller from implemented as 'first member is base class'.
         * (This is the 'C' way to express derivation) */
        QUEX_NAME(BufferFiller)   base;

        InputHandleT*             ih;

        /* position in stream where analysis started */
        STREAM_POSITION_TYPE(InputHandleT)  start_position;  

        STREAM_POSITION_TYPE(InputHandleT)  _last_stream_position;  
#       ifdef QUEX_OPTION_STRANGE_ISTREAM_IMPLEMENTATION
        /* Index of the character where the next read will start */
        ptrdiff_t                           _character_index;
#       endif
    } TEMPLATIFIER_END(BufferFiller_Plain);

    TEMPLATE_IN(InputHandleT)  TEMPLATED(BufferFiller_Plain)*
    QUEX_NAME(BufferFiller_Plain_new)(InputHandleT* input_handle);
    /* input_handle  is the file handle or pointer to the input stream from where the
     *               incoming characters are to be read.                             */

#   undef TEMPLATED_CLASS

QUEX_NAMESPACE_MAIN_CLOSE

#include <quex/code_base/temporary_macros_off>

#endif /* __INCLUDE_GUARD__QUEX_BUFFER_INPUT_STRATEGY_PLAIN__ */
